package com.app.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 发放记录
 * </p>
 *
 * @author yoominic
 * @since 2024-06-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_distribution_records")
public class DistributionRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商家id
     */
    private Integer businessId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 发放的券
     */
    private BigDecimal amount;

    /**
     * 发放的积分
     */
    private BigDecimal integral;

    /**
     * 发放时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp distributionTime;

    /**
     * 发放类型1增加2扣减 券
     */
    private Integer amountDistributionType;

    /**
     * 发放类型1增加2扣减 积分
     */
    private Integer integralDistributionType;

    @TableField(exist = false)
    private String amountDistributionTypeName;

    @TableField(exist = false)
    private String integralDistributionTypeName;

    /**
     * 1商家2个人
     */
    private Integer type;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;


}
